package ch.zbw.pra.sysventory.database.mapper;

import java.io.Serializable;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;
import ch.zbw.pra.sysventory.model.Software;

/**
 * Mapping von einem Resultset auf ein Software Objekt
 * 
 * @author Roberto Lucas
 */

public class SoftwareMapper implements RowMapper<Software>, Serializable {

	private static final long serialVersionUID = -4162133058987389304L;

	public Software mapRow(ResultSet rs, int rowNum) throws SQLException {
		Software software = new Software();
		software.setSoftwareId(rs.getInt("softID_pk"));
		software.setNameSoftware(rs.getString("softName"));
		software.setVersionSoftware(rs.getString("softVersion"));
		software.setSoftwareVendor(rs.getString("softVendor"));
		return software;
	}

}
